home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15986 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: solon.com!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c,comp.lang.c.moderated,comp.lang.c++
  4. Subject: Re: Is C/C++ convertor available ???
  5. Date: 8 Apr 1996 22:46:19 -0500
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Sender: clc@solutions.solon.com
  8. Approved: clc@solutions.solon.com
  9. Message-ID: <4kcmib$ova@solutions.solon.com>
  10. References: <4k5vt7$a3c@solutions.solon.com>
  11. NNTP-Posting-Host: solutions.solon.com
  12.  
  13. In article <4k5vt7$a3c@solutions.solon.com>,
  14. Venki Ramachandran <venkir@CellNet.com> wrote:
  15. >Hi gurus,
  16. >How do i convert C++ code to C. I heard that g++ or gcc has an option at the 
  17. >command line to do that. Can anyone direct me in the right direction ??
  18.  
  19. You heard wrong. g++ is a C++ compiler, not a C++ to C translator, and it has
  20. no such option.
  21.  
  22. One software which does C++ to C translation is called ``cfront''. Some systems
  23. (e.g. HP-UX) use this as their C++ compiler. If you want a one-time translation
  24. job done, rent some time on a system that has cfront, such as a HP workstation
  25. running HP-UX:
  26.  
  27.  
  28.  CC(1)                                                                 CC(1)
  29.  
  30.  NAME
  31.       CC - C++ translator/compiler
  32.  
  33.  SYNOPSIS
  34.       CC [ options ] files
  35.  
  36.  DESCRIPTION
  37.       CC (capital CC) is the HP-UX C++ translator/compiler.  In translator
  38.       mode CC translates C++ source code to C source code.  In compiler mode
  39.       CC compiles C++ source code directly to object code.
  40.  
  41.       The command uses cpp(1) for preprocessing, cfront for syntax and type
  42.       checking, as well as for code generation in compiler mode, and cc(1)
  43.       for code generation in translator mode.
  44.  
  45. -- 
  46.